package manager

type Registry struct {
	Name            string `toml:"name"`
	Address         string `toml:"address"`
	Username        string `toml:"username"`
	RawPassword     string `toml:"password,omitempty"`
	EncodedPassword string `toml:"encodePassword,omitempty"`
	Password        `toml:",inline"`
	Architectures   []string `toml:"architecture"`
}

func (r *Registry) Tidy() {
	if r.RawPassword != "" {
		r.Raw = r.RawPassword
		r.RawPassword = ""
	}
	if r.EncodedPassword != "" {
		r.Aes = r.EncodedPassword
		r.EncodedPassword = ""
	}
}
